<template>
	<div  style="background-color: ;">
		<div >
			<van-row>
			  <van-col span="3"><router-link to="/guahao"><van-icon name="arrow-left" size="30"/> </router-link> </van-col>
			  
			  <van-col span="18">我的</van-col>
			  
			  <van-col span="3"><router-link to="/m2"><van-icon name="share-o" size="30"/> </router-link></van-col>
			</van-row>
			
			<van-row style="margin-top: 0.625rem;">
				<van-col span="1"></van-col>
				<van-col span="4">
					<van-uploader :after-read="afterRead">
						<van-image
						  round
						  width="4rem"
						  height="4rem"
						  :src="headurl"
						/>
					</van-uploader>
				</van-col>
				<van-col span="8" style="pos-left: auto;"><h3>鹿友12306</h3></van-col>
				<van-col span="11"></van-col>
			</van-row>
		</div>
		
		<div style="background-color: white; margin-top: 20px;" >
			<div><h4 style="margin-right: 240px;">我的健康服务</h4></div>
			
			<van-row>
				<van-col span="6"><van-icon name="clock-o" size="30px"  color="#21ADB4"/> <br />
				<h6>历史记录</h6>
				</van-col>
				<van-col span="6"><router-link to="/ghkefu"><van-icon  name="service-o" size="30px" color="#21ADB4"   /></router-link> <br /> 
				<h6>客服</h6>
				</van-col>
				<van-col span="6">
				<van-icon name="volume-o" size="30px" color="#21ADB4" /> <br />
				<h6>放号提醒</h6>
				</van-col>
				<van-col span="6"></van-col>
			</van-row>
		</div>
		
		<div style="background-color: white; margin-top: 50px;">
			<h4 style="margin-right: 250px;">我就诊过的科室</h4>
			
			<div style="margin-top: 1.875rem; margin-bottom: 30px;">
			<h6>暂时还没有数据，亲</h6>
			</div >
			
			
		</div>
		
		
		
		
		
		
		
		<div style="margin-bottom: 0px;">
		      <van-sticky>
		        <van-tabbar v-model="active" route>
		          <van-tabbar-item replace to="/guahao"  icon="smile-o">首页</van-tabbar-item>
		          <van-tabbar-item icon="manager-o" to="/ghmy">我的</van-tabbar-item>
		        </van-tabbar>
		      </van-sticky>
		</div>
	</div>
</template>

<script>
	export default{
		data(){
			return{
				headurl:"https://img.yzcdn.cn/vant/cat.jpeg"
			}
		},methods:{
		tzLogin(){
			this.$router.push("/login");
		},
		afterRead(file){
			var that = this;
			console.log(file);
			const forms = new FormData();
			//这里的file表示给后台传的属性名字，这里看接口文档需要传的属性
			forms.append("file",file.file);//获取上传图片信息
			
			this.axios.post("oss/uploadHeadImg",forms,{
				headers:{
					'Content-Type':'multipart/form-data',
					
				},
			}).then((res)=>{
						if(res.data.code==200){
							that.headurl=res.data.data;
						}
					}).catch((e)=>{
				
				})
			}
		}
		
	}
</script>

<style>
	
	
	
</style>
